<div class="col-lg-12 wrapperbox">
	<form class="form-horizontal" role="form" method="post">
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">账号</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="tbunitname" name="tbunitname" placeholder="账号">
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">密码</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="pwd" name="pwd" placeholder="密码">
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">用户名</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="tbaddress" name="tbaddress" placeholder="用户名">
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">角色</label>
			<div class="col-sm-10">
				<select class="form-control" id="userlevel" name="userlevel">
					<option>超级管理员</option>
					<option>普通用户</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">部门</label>
			<div class="col-sm-10">
				<select class="form-control" id="parement" name="parement">
					<option>教学部</option>
					<option>财务部</option>
					<option>行政部</option>
					<option>学工部</option>
					<option>就业部</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">排序</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="num" name="num" placeholder="排序">
			</div>
		</div>
		<div class="form-group">
			<label for="" class="col-sm-2 control-label">是否启用</label>
			<div class="col-sm-10">
				<label class="checkbox-inline">
					<input type="checkbox" id="enable">启用
				</label>
			</div>
		</div>
	</form>
</div>

<script type="text/javascript">
	//渲染
	//console.log(location.hash)
	//	window.onload = function () {}
	var str = location.hash.split("=")[1];
	// console.log("------",str)
	$.get("/useredit", {
		str
	}, function (data) {
		$("#tbunitname").val(data.name);
		$("#tbaddress").val(data.nickname)
		$("#parement").val(data.department)
		$("#userlevel").val(data.role)
		$("#num").val(data.num)
		$("#pwd").val(data.pwd)
		//console.log(data.isflag)
		if (data.isflag == 1) {
			$("#enable").prop("checked", "checked") //启用  data.isflag
		}
	})
</script>